fix(docs): point "Edit this page" at apps/docs via github.rootDir - #332
Merged
Merged
Conversation
The layer builds the edit href as
`{url}/edit/{branch}/{rootDir}/content/{stem}.{extension}` and drops the
segment when `rootDir` is unset, so every "Edit this page" link resolved to
`/edit/main/content/...` and 404'd — the content lives at `apps/docs/content/`.
Relates to UXF-169.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
16 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The docs theme layer builds the "Edit this page" href as
{url}/edit/{branch}/{rootDir}/content/{stem}.{extension}and filters out falsysegments.
github.rootDirwas unset, so the segment was dropped and every linkresolved to
https://github.com/styleframe-dev/styleframe/edit/main/content/...— a 404, because the docs content lives at
apps/docs/content/.Setting
rootDir: "apps/docs"restores the correct target.Found while auditing the same bug in the inkline consumer of
@uxfront/layer-docs(both repos had it). Fixed per-consumer rather than defaulted in the layer, because
the layer cannot know a consumer's directory layout — inferring it from the git root
would be a separate layer change.
Related issue
Relates to UXF-169.
Type of change
Checklist
feat(theme): …)pnpm build:nodocs && pnpm lint && pnpm typecheck && pnpm testand everything passespnpm changeset) for changes to publishable packages, or this change only touches docs/storybook/app/playground/testsdist/,.styleframe/)mainand stays focused in scopeNotes
One-line config change in
apps/docs; no publishable package touched, so no changeset.Full local suite not run — CI covers it.
Verified in the sibling inkline repo by prerendering the docs and reading the emitted
href, which changed from
/edit/main/content/docs/...to/edit/main/apps/website/content/docs/.... The path shape is identical here.Separately noted, not changed:
toc.bottom.editin the same file points at.../edit/main/docs/content, which is also stale — but nothing in the current layerreads that key, so it is dead config rather than a live 404.